<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
// return [
//     '__pattern__' => [
//         'name' => '\w+',
//     ],
//     '[hello]'     => [
//         ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//         ':name' => ['index/hello', ['method' => 'post']],
//     ],

// ];
// Route::any('login' , 'admin/login/login' , ['ext' => 'html']);



// Route::group('admin' ,function(){
//     Route::get('banners/index' , 'admin/banners/index' , ['ext' => 'html']);
//     Route::get('banners/create' , 'admin/banners/create' , ['ext' => 'html']);
//     Route::post('banners/save' , 'admin/banners/save' , ['ext' => 'html']);
//     Route::get('banners/edit/:id' , 'admin/banners/edit' , ['ext' => 'html'] , ['id' => '\d+']);
    
//     Route::post('banners/update' , 'admin/banners/update');
    
//     //Route::post('banners/read/:id' , 'admin/banners/read' , ['ext' => 'html'] , ['id' => '\d+']);
//     Route::get('banners/delete/:id' , 'admin/banners/delete' , ['ext' => 'html'] , ['id' => '\d+']);


// });


//Restful 接口路由
Route::resource('news' , 'api/news');
